

const http = require('http')
const url = require('url')
const server = http.createServer((req,res)=>{
    console.log('请求过来了。。。');
    console.log(req.url);
    console.log(url.parse(req.url));
    // console.log(url.parse(req.url,true));
    let queryObj = url.parse(req.url,true)
    // console.log(queryObj);
    console.log(queryObj.query.name);
    console.log(queryObj.query.age);
})

server.listen(3001,()=>{
    console.log(`serve is running...`);
})